import {MapPageBusiness} from "./map-baidu/map-page-business";
import {MapType} from "./models/map-type";
import {IMapBusiness} from "./imap-business";
import { MapConfig } from './map-config';

export class MapBusinessFactory{
    static getMapBusiness():IMapBusiness{
        let type:MapType = MapConfig.mapType;
        let business:IMapBusiness;
        if(type === MapType.QQMap){
            business = new MapPageBusiness();
        }else if(type === MapType.BaiduMap){
            business = new MapPageBusiness();
        }else if(type === MapType.Amap){
            business = new MapPageBusiness();
        }else if(type === MapType.GoogleMap){
            business = new MapPageBusiness();
        }else if(type === MapType.SogouMap){
            business = new MapPageBusiness();
        }else{
            business = new MapPageBusiness();
        }
        return business;
    }
}
